use "nego_study2a.dta", clear

*demographics
gen age_r = age + 17
sum age_r
tab gender,m

*manipulation check
alpha mnpc*, gen (mc)
oneway mc s3, tab
reg mc s3


*generate integrative value
by dydid, sort: egen intdyd = mean(pwarranty+pdelivery)

*main analysis
duplicates drop dydid, force

reg intdyd s3 if lottery == 1
estat esize
table s3 if e(sample)==1, c(mean intdyd sd intdyd n intdyd)
reg intdyd s3 if lottery == 0
estat esize
reg intdyd i.s3##i.lottery
estat esize
margins, dydx(s3) at(lottery=(0 1)) vsquish


*analysis of distributive and compatible issues
use "nego_study2a.dta", clear
**exp condition
reg pprice s3 if lottery == 1 & role == 0
reg pprice s3 if lottery == 1 & role == 1
reg pcolor s3 if lottery == 1
**manipulation check as robustness check
reg pprice mc if lottery == 1
reg pcolor mc if lottery == 1



